//预留个人信息
import { getYaliUserInfo } from '../../../../utils/checkAuth';
import getIn from '../../../../yali-sdk/utils/getIn';
import immutable from '../../../../yali-sdk/lib/immutable';
import frequentClick from '../../../../yali-sdk/utils/frequentClick';
import apiSaveAnchor from '../../../../yali-sdk/business/live/api/apiSaveAnchor';
import { FAIL } from '../../../../yali-sdk/utils/fail';
import { SUCCESS } from '../../../../yali-sdk/utils/success';
import { filterImg } from '../../../imgBaseUrl';
Page({
    onLoad(e) {
        const mobile =e.mobile;
        getYaliUserInfo().then((user) => {
           let new_user = filterImg(user, 'head_photo')
            this.setData({
                user:new_user,
                info: immutable.fromJS([
                     {
                        type: 'mobile',
                        name: '手机号码',
                        value: mobile?mobile:user.mobile,
                        url: '/pages/anchor/center/seting/mobile/mobile',
                        is_band:true,
                        function:'upDataMobile'
                    },
                ]),
            });
        });
    },
    upDataMobile(e){
       let uid = getIn(e,['currentTarget','dataset','uid']);
       let url = getIn(e,['currentTarget','dataset','url']);
       wx.navigateTo({
                url: url+'?uid='+uid,
            });
    }
    
});
